package strategyexample.src.yjf.supperObj;


import strategyexample.src.yjf.behavior.FlyBehavior;
import strategyexample.src.yjf.behavior.QuackBehavior;

/**
 * 鸭子的原始超类
 * @author yaojianfeng
 */
public abstract class BaseDuck {
    public FlyBehavior flyBehavior;
    public QuackBehavior quackBehavior;

    public void performFly() {
        flyBehavior.fly();
    }

    public void performQuack() {
        quackBehavior.quack();
    }

    /**
     *描述
     */
    public abstract void display();


    public void setFlyBehavior(FlyBehavior flyBehavior) {
        this.flyBehavior = flyBehavior;
    }


    public void setQuackBehavior(QuackBehavior quackBehavior) {
        this.quackBehavior = quackBehavior;
    }
}
